package top.continew.admin.req.pdnew;

import cn.shengchao.examstar.rpc.distribute.req.ProductThirdDistributeProxyReq;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @program: examstar-manger-api
 * @description: 第三方产品配置保存
 * @author: Xiong weiqiang
 * @create: 2025-06-11 11:47
 */
@Data
public class ProductThirdDistributeProxySaveReq {
    @NotNull
    private Long userId;
    @NotNull
    private Long productId;
    @NotNull
    private BigDecimal proxyPercent;

    @NotNull
    private Date validStartTime;

    /**
     * 有效结束时间
     */
    @NotNull
    private Date validEndTime;
    public ProductThirdDistributeProxyReq toProductThirdDistributeProxyReq() {
        ProductThirdDistributeProxyReq req = new ProductThirdDistributeProxyReq();
        req.setProductId(this.getProductId());
        req.setProxyPercent(this.getProxyPercent());
        req.setValidStartTime(this.getValidStartTime());
        req.setValidEndTime(this.getValidEndTime());
        req.setUserId(this.getUserId());
        return req;
    }
}